package com.zhu.classfile.constant.base;

import com.zhu.classfile.constant.ConstantInfo;
import com.zhu.classfile.constant.ConstantTag;

import java.nio.ByteBuffer;

//CONSTANT_Double_info
public class ConstantDoubleInfo implements ConstantInfo {
    private final ConstantTag tag = ConstantTag.CONSTANT_Double;
    private double value;

    @Override
    public void readInfo(ByteBuffer reader) {
        value = reader.getDouble();
    }

    public double getValue() {
        return value;
    }

    @Override
    public ConstantTag getTag() {
        return tag;
    }
}
